package net.cyndeline

/**
 * Used to track a value between two limits. Used for experience,
 * charges etc.
 */
trait Counter {
  
  /** The lowest value possible. */
  def min: Int
  
  /** Sets the lowest value possible. */
  def min_=(minValue: Int)
  
  /** The highest value possible. */
  def max: Int
  
  /** Sets the highest value possible. */
  def max_=(maxValue: Int)
  
  /** The current value. */
  def value: Int
  
  /**
   * Sets the current value for the counter. If this value is above
   * or below the min/max limits, the limit will be used instead.
   */
  def set(value: Int)
  
}